<?php
class Del extends Controller {
	public function json() {
		$gid = $this->post('gid', 'int');
				
		if(!$gid) $this->displayJSON(array('status' => -1, 'message' => '未知分组'));
		
		$mNode = new Node_model();
		$params = array('gid' => $gid);
		$result = $mNode->delGroup($params);
		if($result) $this->displayJSON(array('status' => 0, 'message' => '删除分组成功'));
		else $this->displayJSON(array('status' => -2, 'message' => '删除分组失败'));
	}
}